package org.jupiter.blog.api.convertor;

import org.jupiter.blog.api.domain.JupiterComment;
import org.jupiter.blog.api.dto.JupiterCommentDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValuePropertyMappingStrategy;

@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface JupiterCommentConvertor {

	JupiterCommentDTO toDto(JupiterComment domain);

	JupiterComment toEntity(JupiterCommentDTO dto);

	void updateDomainFromUpdateDto(JupiterCommentDTO updateDto, @MappingTarget JupiterComment domain);
}

